package com.rbac.modules.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;

@Data
@TableName("sys_permission")
public class SysPermission {
    @TableId(type = IdType.AUTO)
    private Long id;
    
    private Long parentId;
    
    private String permissionName;
    
    private String permissionCode;
    
    private Integer permissionType; // 1-菜单，2-按钮
    
    private Long menuId;
    
    private String path;
    
    private String component;
    
    private String icon;
    
    private Integer sort;
    
    private Integer status; // 0-禁用，1-启用
    
    private LocalDateTime createTime;
    
    private LocalDateTime updateTime;
    
    private Boolean isDeleted;

    @TableField(exist = false)
    private List<SysPermission> children;
} 